#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <phonon>
#include <QUrl>
#include <QtNetwork>
#include <QProcess>

#include "downloadprogressdialog.h"
#include "settingdialog.h"
#include "dictationfile.h"

namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    //void selfInitialized();
    Ui::MainWindow *ui;
    //Phonon::VideoWidget *vwidget;
    DownloadProgressDialog *progressDialog;
    SettingDialog *settingDialog;
    DictationFile dfile;
    bool m_modified;

private slots:
    void on_scriptTextEdit_textChanged();
    void on_actionAbout_Qt_triggered();
    void on_actionStop_triggered();
    void on_actionPause_triggered();
    void on_actionPlay_triggered();
    void on_actionPreferences_triggered();
    void on_actionOpen_File_triggered();
    void on_actionQuit_triggered();
    void on_actionSave_triggered();
    void on_downloadAsfButton_clicked();
    void on_selectNewsButton_clicked();
    void on_actionCheck_Answer_triggered();
    //void on_actionHide_Transcript_triggered();
    //void on_actionShow_Transcript_triggered();
    //void on_newsItemListView_clicked(QModelIndex index);
    void on_actionUpdate_News_triggered();
    void on_pauseButton_clicked();
    void on_playButton_clicked();
    void on_actionAbout_triggered();

    void boardIndexReplyFinished(QNetworkReply*);
    void contentReplyFinished(QNetworkReply*);
    void replyError(QNetworkReply::NetworkError);
    void updateProgress(qint64, qint64);
    void downloadProcessFinished(int, QProcess::ExitStatus);
    void videoPlayerFinished();
};

#endif // MAINWINDOW_H
